﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title></title>
    <script type="text/javascript">
        //BOM window

        ///window.alert
        //window.String
        //window.confirm
        //window.Date
        /*
        var Num = 99;
        this.Num = 88;

        document.write(window.Num);
        */

        /**/
        function CloseWin() {
            window.close();
        }

        var PageValue;

        function OpenWin() {
            PageValue = document.getElementById("txtValue").value;
            var openPage = window.open("HTMLPage6.htm", "PageName", "width=200,height=200,status=yes,toolbar=yes"); //,fullscreen=yes
            openPage.document.getElementById("txt2").value = PageValue;
        }

        function ShowDialog() {
            var person = new Object();
            person.Name = "z3";
            person.Age = "18";
            var val = window.showModalDialog("HTMLPage7.htm", [1, person],"dialogHeight:100px;dialogWidth:100px;");

            document.getElementById("txtValue").value = val;
        }

        function Test(params) {

        }

        function Test() {
            var obj = new Person();
            alert(obj.Name);
        }

        function Person() {
            this.Name = "aaa";
            return this.Name;
        }
    

    </script>
</head>
<body>
    <input type="button" value="close" onclick="CloseWin();" />
    <input type="button" value="open" onclick="OpenWin();" />
    <input type="button" value="ShowDialog" onclick="ShowDialog();" />
    <input id="txtValue" type="text" />
    <input type="button" onclick="Test();" />
</body>
</html>
